<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Laravel</title>
    <link rel="stylesheet" href="/js/layui/css/layui.css">
    <link rel="stylesheet" href="/css/index.css">
    <link rel="stylesheet" href="/css/reset.css">
</head>
<body class="main ">
<div id="particles-js" class=" ">
    <div class="main_alert">
        <h1>创作统计</h1>
        <div class="layui-form">
            <div class="layui-input-inline">
                <select class="layui-select" name="w_id" lay-filter="filter">
                    <option value="0">请选择工作室</option>
                    @foreach ($work_list as $work)
                        <option @if($w_id == $work['id']) selected @endif value="{{ $work['id'] }}">{{ $work['work_name'] }}</option>
                    @endforeach
                </select>
            </div>
        </div>
        <table class="layui-table" lay-skin="row" lay-size="lg">
            <colgroup>
                <col>
                <col>
                <col>
                <col>
                <col>
            </colgroup>
            <thead>
            <tr>
                <th>ID</th>
                <th>工作室名称</th>
                <th>科室名称</th>
                <th>创作数量</th>
            </tr>
            </thead>
            <tbody>



            @foreach ($result['list'] as $user)
                <tr>
                    <td>{{ $user->id }}</td>
                    <td>{{ $user->work_name }}</td>
                    <td>{{ $user->classify_name }}<br/>
                    <td>{{ $user->order_count }}</td>
                </tr>
            @endforeach
            </tbody>
        </table>
        总条数:{{$result['total']}};
        总页数:{{$result['page_total']}};
        当前页:{{$result['page']}};
        每页显示条数:10;
        <div id="page"></div>
    </div>
</div>
<script src="/js/jquery.min.js"></script>
<script src="/js/layui/layui.js"></script>
<script>
    // 弹窗
    layui.use(function() {
        var form = layui.form;
        form.render()

        form.on('select(filter)', function (data){
            location.href = '/admin/getworkcreatenumberlist?page=1&w_id='+data.value
        });
    })
</script>
</body>
</html>
